
import request from '@/utils/request'


// 封装一个删除公司部门的请求
export function delDepts(id) {

    return request({
      url: `/company/department/${id}`,
      method: 'delete'
    })
  }
// 封装一个获取公司部门列表的请求
export function getDepartments(){
  return request({
    url: '/company/department'
  })
}
  // 封装一个新增公司部门的请求
export function addDepts(data) {

  return request({
    url: `/company/department`,
    method: 'post',
    data
  })
}

// 封装一个获取某个部门详情的请求
export function getDeptsDetail(id) {

  return request({
    url: `/company/department/${id}`,
  })
}

// 封装一个修改部门的请求
export function editDepts(data) {

  return request({
    url: `/company/department/${data.id}`,
    method:'put',
    data
  })
}